package panda.android.notebook.Utils;

import panda.android.notebook.MainActivity;

public class Utils {

	public int screenWidth;
	public int screenHeight;

	public Utils() {
		screenWidth = MainActivity.SCREEN_WIDTH;
		screenHeight = MainActivity.SCREEN_HEIGHT;
	}

	public int width(int f) {
		float rate = (float) MainActivity.SCREEN_WIDTH / 480;
		return (int) (f * rate);
	}

	public int height(float f) {
		float rate = (float) MainActivity.SCREEN_HEIGHT / 800;
		return (int) (f * rate);
	}

	public int fontsize(float f) {
		float rate = (float) MainActivity.SCREEN_WIDTH / 480;
		return (int) (f * rate);
	}
}
